package com.firefly.admin.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.firefly.admin.common.vo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;
import java.util.List;

@ApiModel(value = "FySystemOrganization", description = "系统组织机构信息")
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
public class FySystemOrganization extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "组织机构ID")
    private Long orgId;

    @ApiModelProperty(value = "组织机构父ID")
    private Long parentId;

    @ApiModelProperty(value = "组织机构名称")
    private String orgName;

    @ApiModelProperty(value = "负责人ID")
    private Long directorId;

    @ApiModelProperty(value = "排序")
    private Double orgSort;

    @ApiModelProperty(value = "组织机构状态,1:启用，0:停用")
    private String orgStatus;

    @ApiModelProperty(value = "子组织", hidden = true)
    @TableField(exist = false)
    private List<FySystemOrganization> children;

    @ApiModelProperty(value = "父组织", hidden = true)
    @TableField(exist = false)
    private FySystemOrganization parent;

    @ApiModelProperty(value = "负责人信息", hidden = true)
    @TableField(exist = false)
    private FySystemUser director;
}
